﻿using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;

namespace HelenServer.Migrator;

[Table("zt_file")]
[Index("ObjectId", Name = "objectID")]
[Index("ObjectType", Name = "objectType")]
public partial class ZtFile
{
    [Key]
    [Column("id", TypeName = "mediumint(8) unsigned")]
    public uint Id { get; set; }

    [Column("title")]
    [StringLength(255)]
    public string Title { get; set; } = null!;

    [Column("pathname")]
    [StringLength(100)]
    public string Pathname { get; set; } = null!;

    [Column("extension")]
    [StringLength(30)]
    public string Extension { get; set; } = null!;

    [Column("size", TypeName = "int(10) unsigned")]
    public uint Size { get; set; }

    [Column("objectType")]
    [StringLength(30)]
    public string ObjectType { get; set; } = null!;

    [Column("objectID", TypeName = "mediumint(9)")]
    public int ObjectId { get; set; }

    [Column("addedBy")]
    [StringLength(30)]
    public string AddedBy { get; set; } = null!;

    [Column("addedDate", TypeName = "datetime")]
    public DateTime AddedDate { get; set; }

    [Column("extra")]
    [StringLength(255)]
    public string Extra { get; set; } = null!;

    [Column("deleted", TypeName = "enum('0','1')")]
    public string Deleted { get; set; } = null!;
}